package com.example.basic.web.model.device;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 应用终端
 * </p>
 *
 * @roleor zzl
 * @since 2024-3-14
 */
@Data
@TableName("sys_device")
@ApiModel(value="Device对象", description="应用终端")
public class Device extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "序号")
    @TableField("sort_no")
    private Integer sortNo;

    @ApiModelProperty(value = "设备编码")
    @TableField("device_code")
    private String deviceCode;

    @ApiModelProperty(value = "设备名称")
    @TableField("device_name")
    private String deviceName;

    /**
     * 设备类型 1入口处 2暂存区 3消毒 4spa 5化妆 6瞻仰 7火花 10负一负二中专提升机 11担架板 12 担架板中专 13瞻仰前缓存区 14发往火化前暂存区 15火化返回提升机前暂存区
     */
    @ApiModelProperty(value = "设备类型")
    @TableField("device_type")
    private String deviceType;

    @ApiModelProperty(value = "设备类型")
    @TableField(exist = false)
    private String deviceTypeName;

    @ApiModelProperty(value = "设备图片")
    @TableField("device_img")
    private String deviceImg;

    @ApiModelProperty(value = "设备型号")
    @TableField("device_model")
    private String deviceModel;

    @ApiModelProperty(value = "终端地址")
    @TableField("terminal")
    private String terminal;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String statusName;

    @ApiModelProperty(value = "拼音码")
    @TableField("py_code")
    private String pyCode;

    @ApiModelProperty(value = "五笔码")
    @TableField("wb_code")
    private String wbCode;

    @ApiModelProperty("启用标识 0:停用   1:启用")
    @TableField("enable_flag")
    private String enableFlag;

    @ApiModelProperty(value = "设备地址")
    @TableField("device_address")
    private String deviceAddress;

    @ApiModelProperty(value = "设备地址")
    @TableField(exist = false)
    private String deviceAddressName;

    @ApiModelProperty(value = "设备点位")
    @TableField("device_point")
    private String devicePoint;
}